RATS386 4.10c. Run on Aug  2 1997
(c) 1992-4 Thomas A. Doan. All rights reserved
******************************************************************
****                                                          ****
****     RATS386 batch program to replicate results from      ****
****    Box-Steffensmeier, Janet M. and Renee M. Smith. 1998. ****
****    "Investigating Political Dynamics Using Fractional    ****
****     Integration Methods" American Journal of Political   ****
****    Science. Forthcoming                                  ****
****                                                          ****
******************************************************************

* read in quarterly data
calendar 1953 1 4
allocate 1992:4
open data c:\finals\pub97\ajps\ajps2.dat
data(format=free,org=obs) / app sent mespart party events $
   assass iran viet water

* descriptive statistics for key variables
smpl 53:1 92:4
table / app sent mespart

Series             Obs       Mean       Std Error      Minimum       Maximum
APP                 160  56.451750000  12.198349695  26.300000000  80.810000000
SENT                160  83.296375000  14.439870227  47.570000000 106.170000000
MESPART             160  61.266250000   4.706370465  51.000000000  69.500000000


* create administration dummy variables
set dde 53:1 60:4 = 1
set dde 61:1 92:4 = 0
set jfk 53:1 60:4 = 0
set jfk 61:1 61:1 = 1
set jfk 61:2 92:4 = 0
set lbj 53:1 63:3 = 0
set lbj 63:4 63:4 = 1
set lbj 64:1 92:4 = 0
set rmn 53:1 68:4 = 0
set rmn 69:1 69:1 = 1
set rmn 69:2 92:4 = 0
set grf 53:1 74:2 = 0
set grf 74:3 74:3 = 1
set grf 74:4 92:4 = 0
set jec 53:1 76:4 = 0
set jec 77:1 77:1 = 1
set jec 77:2 92:4 = 0
set rwr 53:1 80:4 = 0
set rwr 81:1 81:1 = 1
set rwr 81:2 92:4 = 0
set ghb 53:1 88:4 = 0
set ghb 89:1 89:1 = 1
set ghb 89:2 92:4 = 0

* rescale vietnam deaths variable
set nviet 53:1 92:4 = viet/1000

* create variable for iran-contra scandal
set contra 53:1 86:3 = 0
set contra 86:4 88:4 = 1
set contra 89:1 92:4 = 0

* create a new events series
* that combines separate events
set nevents 53:1 92:4 = events+iran+assass+contra

* create variable for gulf war
set gulf 53:1 90:4 = 0
set gulf 91:1 91:2 = 1
set gulf 91:3 92:4 = 0

* all variables previously coded for correctly signed
* effects on approval
* create new variables for macropartisanship equation
* by multiplying each by party variable
set psent 53:1 92:4 = party*sent
set pnviet 53:1 92:4 = party*nviet
set pwater 53:1 92:4 = party*water
set piran 53:1 92:4 = party*iran
set pevents 53:1 92:4 = party*events
set passass 53:1 92:4 = party*assass
set pcontra 53:1 92:4 = party*contra
set pgulf 53:1 92:4 = party*gulf
set pnevents 53:1 92:4 = party*nevents

* create political portion of approval
set resid 53:2 92:4 = app - .297*sent{-1}
set presid 53:2 92:4 = party*resid

* create first differences
set dresid 53:2 92:4 = resid - resid{-1}
print / dresid


 ENTRY         DRESID
 1953:01        NA
 1953:02   -0.98010000000
 1953:03   10.05681000000
 1953:04   -4.55191000000
 1954:01    5.67490000000
 1954:02   -2.68551000000
 1954:03    6.23481000000
 1954:04   -6.25331000000
 1955:01    2.18310000000
 1955:02   -4.49510000000
 1955:03   -2.50000000000
 1955:04    0.65812000000
 1956:01    5.10659000000
 1956:02    1.57090000000
 1956:03   -8.18800000000
 1956:04    1.99459000000
 1957:01    7.04470000000
 1957:02    2.12192000000
 1957:03    2.05709000000
 1957:04    3.41161000000
 1958:01    2.91669000000
 1958:02   -0.63451000000
 1958:03   -0.36739000000
 1958:04   -1.91420000000
 1959:01   -3.82741000000
 1959:02   -2.60060000000
 1959:03   -1.02830000000
 1959:04    1.19952000000
 1960:01    2.24788000000
 1960:02    1.03742000000
 1960:03    0.51779000000
 1960:04   -9.54701000000
 1961:01   -6.45150000000
 1961:02    0.60962000000
 1961:03   -0.43151000000
 1961:04   -2.13609000000
 1962:01    3.89968000000
 1962:02    9.43522000000
 1962:03   -4.33071000000
 1962:04   -1.55661000000
 1963:01    7.03520000000
 1963:02    4.27820000000
 1963:03   -4.67589000000
 1963:04  -13.11719000000
 1964:01    3.51550000000
 1964:02    3.07618000000
 1964:03    3.20460000000
 1964:04   -0.26240000000
 1965:01    2.59730000000
 1965:02    3.64520000000
 1965:03   -1.06260000000
 1965:04    4.49162000000
 1966:01    6.46380000000
 1966:02    0.25278000000
 1966:03    5.67650000000
 1966:04   -0.57760000000
 1967:01   -0.94060000000
 1967:02    4.30870000000
 1967:03   -0.23638000000
 1967:04   -0.40882000000
 1968:01   -0.64850000000
 1968:02    3.82340000000
 1968:03   -2.84538000000
 1968:04  -19.36252000000
 1969:01   -2.82688000000
 1969:02   -1.40080000000
 1969:03   -0.24740000000
 1969:04    0.78159000000
 1970:01    3.41250000000
 1970:02   -0.15280000000
 1970:03    1.02070000000
 1970:04    4.22869000000
 1971:01    3.04351000000
 1971:02   -0.40161000000
 1971:03    3.16041000000
 1971:04   -4.08631000000
 1972:01   -3.46819000000
 1972:02   -2.78010000000
 1972:03   -5.07389000000
 1972:04   -1.62881000000
 1973:01   12.09971000000
 1973:02   12.05978000000
 1973:03    2.68510000000
 1973:04    5.43311000000
 1974:01   -1.28800000000
 1974:02  -26.33151000000
 1974:03    3.49632000000
 1974:04   13.90489000000
 1975:01   -7.00840000000
 1975:02   -0.60131000000
 1975:03    5.84262000000
 1975:04   -3.36992000000
 1976:01    1.89650000000
 1976:02   -0.69240000000
 1976:03   -4.36798000000
 1976:04  -18.46730000000
 1977:01    5.20799000000
 1977:02    1.17380000000
 1977:03    4.89611000000
 1977:04    4.39020000000
 1978:01    7.32439000000
 1978:02   -2.18851000000
 1978:03   -9.72699000000
 1978:04    7.98470000000
 1979:01    6.09151000000
 1979:02    4.45509000000
 1979:03  -11.54030000000
 1979:04   -9.94841000000
 1980:01   16.78250000000
 1980:02    8.36540000000
 1980:03   -2.46718000000
 1980:04  -19.54051000000
 1981:01  -10.56231000000
 1981:02    4.61090000000
 1981:03    5.30722000000
 1981:04    5.51348000000
 1982:01    2.88681000000
 1982:02    5.09709000000
 1982:03    0.39002000000
 1982:04    8.89780000000
 1983:01   -5.83362000000
 1983:02   -1.01188000000
 1983:03   -4.39092000000
 1983:04   -4.43489000000
 1984:01    1.34980000000
 1984:02   -1.42999000000
 1984:03   -5.84310000000
 1984:04   -0.51820000000
 1985:01    4.23638000000
 1985:02   -8.11550000000
 1985:03    0.15340000000
 1985:04    0.29370000000
 1986:01   -1.72138000000
 1986:02    1.63870000000
 1986:03    6.55120000000
 1986:04   10.92970000000
 1987:01   -5.68720000000
 1987:02   -0.82551000000
 1987:03    1.80279000000
 1987:04   -0.26938000000
 1988:01    0.84678000000
 1988:02   -4.17820000000
 1988:03   -4.08750000000
 1988:04   -1.40900000000
 1989:01   -2.60009000000
 1989:02   -6.74161000000
 1989:03   -2.42999000000
 1989:04   -5.61479000000
 1990:01    3.80080000000
 1990:02   -6.86642000000
 1990:03   15.46372000000
 1990:04  -20.29040000000
 1991:01    5.68700000000
 1991:02    2.14120000000
 1991:03   13.07270000000
 1991:04   15.97979000000
 1992:01    2.75889000000
 1992:02    7.71831000000
 1992:03        NA
 1992:04        NA


set dpresid 53:2 92:4 = presid - presid{-1}
set dpsent 53:2 92:4 = psent - psent{-1}
set dmes 53:2 92:4 = mespart - mespart{-1}
set dapp 53:2 92:4 = app - app{-1}
set dsent 53:2 92:4 = sent - sent{-1}

* fractionally difference macropartisanship
declare series dfmes
source fif.src
PROCEDURE FIF SERIES1 TBEGP TENDP SERIES2
(01.0020) TYPE INTEGER TBEGP TENDP
(01.0020) TYPE SERIES SERIES1 SERIES2
(01.0020) *
(01.0020) LOCAL REAL    NUM
(01.0022) LOCAL INTEGER TBEG    TEND I
(01.0025) LOCAL SERIES  FILTRO
(01.0048) *
(01.0048) OPTION SWITCH FILTER 1
(01.0060) OPTION REAL   D  0.84
(01.0073) *
(01.0073) INQUIRE(SERIES=SERIES1) TBEG>>TBEGP TEND>>TENDP
(01.0110) *
(01.0110) COMPUTE NUM=1.0
(01.0121) SET(FIRST=1.0) FILTRO TBEG TEND = (I = T-TBEG) , (NUM = NUM * (I-D-1)/I)
(01.0202) *
(01.0202) IF FILTER==1
(02.0217)    {
(03.0217)    SET SERIES2 TBEG TEND = 0.0
(03.0246)    DO T = TBEG,TEND
(04.0273)             DO I = TBEG,T
(05.0300)                 COMPUTE SERIES2(T) = SERIES2(T)+FILTRO(I)*SERIES1(T-I+TBEG)
(05.0352)             END DO I
(04.0354)   END DO T
(03.0356)   }
(02.0356) ELSE
(02.0358)    SET SERIES2 TBEG TEND = FILTRO(T)
(02.0393) *
(02.0393) END PROC FIF





















@fif(d=-.213) dmes / dfmes

* descriptive statistics for dependent variables
smpl 53:4 92:2
table / mespart dfmes dmes

Series             Obs       Mean       Std Error      Minimum       Maximum
MESPART             155  61.386451613   4.716427184  51.000000000  69.500000000
DFMES               155   0.045333749   1.734747084  -3.559424712   5.983987317
DMES                155   0.032258065   1.760199793  -4.000000000   6.100000000


* create starting value for constant term
smpl 53:1 92:4
declare vect inita(1)
do i = 1,1
(01.0023)   compute inita(i)=-.005
(01.0040) end do i

* estimate ARMA model with levels of all variables
smpl 53:4 92:2
nlpar(subiterations=50)
boxjenk(constant,ar=1,inputs=13,initial=inita,iters=1500, $
   define=meseq1) mespart / resid1
# psent 0 1 0
# presid 0 1 0
# pnviet 0 0 0
# pwater 0 0 0
# pnevents 0 0 0
# pgulf 0 0 0
# jfk 0 0 0
# lbj 0 0 0
# rmn 0 0 0
# grf 0 0 0
# jec 0 0 0
# rwr 0 0 0
# ghb 0 0 0

Dependent Variable MESPART - Estimation by Box-Jenkins
Iterations Taken    15
Quarterly Data From 1953:04 To 1992:02
Usable Observations    155      Degrees of Freedom   138
Centered R**2     0.882331      R Bar **2   0.868689
Uncentered R**2   0.999314      T x R**2     154.894
Mean of Dependent Variable      61.386451613
Std Error of Dependent Variable  4.716427184
Standard Error of Estimate       1.709086762
Sum of Squared Residuals        403.09490328
Durbin-Watson Statistic             2.265929
Q(36-1)                            46.686117
Significance Level of Q           0.08951538

   Variable                     Coeff       Std Error      T-Stat     Signif
*******************************************************************************
1.  CONSTANT                  61.82528089   1.48889548     41.52426  0.00000000
2.  AR{1}                      0.90319063   0.04100514     22.02628  0.00000000
3.  N_PSENT{0}                -0.01805924   0.01174804     -1.53721  0.12653080
4.  D_PSENT{1}                 0.50786988   0.43696104      1.16228  0.24712897
5.  N_PRESID{0}                0.07016959   0.02586055      2.71338  0.00750920
6.  D_PRESID{1}                0.52478303   0.25289494      2.07510  0.03983402
7.  N_PNVIET{0}                0.72087591   0.36079569      1.99802  0.04768023
8.  N_PWATER{0}                0.10587618   1.52291366      0.06952  0.94467467
9.  N_PNEVENTS{0}             -0.21803533   0.34768188     -0.62711  0.53162227
10. N_PGULF{0}                 0.29783490   1.29251514      0.23043  0.81809851
11. N_JFK{0}                   0.37736691   1.41488277      0.26671  0.79008866
12. N_LBJ{0}                   0.55542990   1.28995269      0.43058  0.66744435
13. N_RMN{0}                   2.76788074   1.62797909      1.70019  0.09134702
14. N_GRF{0}                   0.80545707   1.47906709      0.54457  0.58692749
15. N_JEC{0}                   0.64529431   1.39236662      0.46345  0.64377092
16. N_RWR{0}                  -0.80972645   1.35047753     -0.59959  0.54976582
17. N_GHB{0}                   0.63109591   1.28104524      0.49264  0.62304889


* estimate effect of shock to macropartisanship
impulse(print) 1 20 1
# meseq1

   Entry           MESPART
            1  1.7090867619846
            2  1.5436311550023
            3  1.3941932005411
            4  1.2592222398052
            5  1.1373177322946
            6  1.0272147229482
            7  0.9277707162033
            8  0.8379538207687
            9  0.7568320420958
           10  0.6835636114380
           11  0.6173882511479
           12  0.5576192855754
           13  0.5036365157055
           14  0.4548797835969
           15  0.4108431598437
           16  0.3710696937456
           17  0.3351466717101
           18  0.3027013346861
           19  0.2733970101902
           20  0.2469296187889



* estimate ARFIMA model
* with fractionally differenced macropartisanship
smpl 53:4 92:2
nlpar(subiterations=50)
boxjenk(constant,ar=1,inputs=13,initial=inita,iters=300, $
   define=meseq2) dfmes / resid2
# psent 0 1 0
# presid 0 1 0
# pnviet 0 0 0
# pwater 0 0 0
# pnevents 0 0 0
# pgulf 0 0 0
# jfk 0 0 0
# lbj 0 0 0
# rmn 0 0 0
# grf 0 0 0
# jec 0 0 0
# rwr 0 0 0
# ghb 0 0 0

Dependent Variable DFMES - Estimation by Box-Jenkins
Iterations Taken    65
Quarterly Data From 1953:04 To 1992:02
Usable Observations    155      Degrees of Freedom   138
Centered R**2     0.093640      R Bar **2  -0.011445
Uncentered R**2   0.094263      T x R**2      14.611
Mean of Dependent Variable      0.0453337493
Std Error of Dependent Variable 1.7347470838
Standard Error of Estimate      1.7446456683
Sum of Squared Residuals        420.04281410
Durbin-Watson Statistic             2.000340
Q(36-1)                            55.866985
Significance Level of Q           0.01398269

   Variable                     Coeff       Std Error      T-Stat     Signif
*******************************************************************************
1.  CONSTANT                 -0.036006432  0.163957286     -0.21961  0.82650049
2.  AR{1}                     0.019859103  0.087838624      0.22609  0.82146887
3.  N_PSENT{0}               -0.000376540  0.005768957     -0.06527  0.94805349
4.  D_PSENT{1}               -1.033710176  0.071667053    -14.42379  0.00000000
5.  N_PRESID{0}              -0.007342519  0.013032685     -0.56339  0.57408182
6.  D_PRESID{1}              -1.016944623  0.072579301    -14.01150  0.00000000
7.  N_PNVIET{0}               0.348696165  0.185201725      1.88279  0.06183370
8.  N_PWATER{0}               0.746919855  0.813951747      0.91765  0.36040502
9.  N_PNEVENTS{0}             0.029741439  0.364799663      0.08153  0.93514007
10. N_PGULF{0}               -1.258717667  1.270646531     -0.99061  0.32360882
11. N_JFK{0}                 -1.109488889  1.774064050     -0.62539  0.53274538
12. N_LBJ{0}                 -1.731562537  1.767068761     -0.97991  0.32884692
13. N_RMN{0}                  2.606319822  1.869028251      1.39448  0.16541397
14. N_GRF{0}                 -1.771985658  1.789944303     -0.98997  0.32392288
15. N_JEC{0}                 -0.373708408  1.793624933     -0.20835  0.83526000
16. N_RWR{0}                  1.186560620  1.792522666      0.66195  0.50910703
17. N_GHB{0}                  2.098806253  1.781815537      1.17790  0.24086247


* estimate effect of shock to fractionally differenced
* macropartisanship
impulse(print) 1 20 1
# meseq2

   Entry            DFMES
            1         1.744646
            2         0.034647
            3         0.000688
            4    1.366426e-005
            5    2.713599e-007
            6    5.388960e-009
            7    1.070296e-010
            8    2.105659e-012
            9    8.252843e-014
           10   -8.184719e-014
           11    1.695758e-013
           12   -3.477070e-013
           13    7.130277e-013
           14   -1.462174e-012
           15    2.998414e-012
           16   -6.148711e-012
           17    1.260888e-011
           18   -2.585647e-011
           19    5.302269e-011
           20   -1.087312e-010



* estimate ARIMA model with first differenced macropartisanship
smpl 53:4 92:2
nlpar(subiterations=50)
boxjenk(diffs=1,constant,ar=1,inputs=13,initial=inita, $
   iters=300,define=meseq3) mespart / resid3
# psent 0 1 0
# presid 0 1 0
# pnviet 0 0 0
# pwater 0 0 0
# pnevents 0 0 0
# pgulf 0 0 0
# jfk 0 0 0
# lbj 0 0 0
# rmn 0 0 0
# grf 0 0 0
# jec 0 0 0
# rwr 0 0 0
# ghb 0 0 0

Dependent Variable MESPART - Estimation by Box-Jenkins
Iterations Taken   104
Quarterly Data From 1953:04 To 1992:02
Usable Observations    155      Degrees of Freedom   138
Centered R**2     0.874602      R Bar **2   0.860063
Uncentered R**2   0.999269      T x R**2     154.887
Mean of Dependent Variable      61.386451613
Std Error of Dependent Variable  4.716427184
Standard Error of Estimate       1.764325978
Sum of Squared Residuals        429.57276941
Durbin-Watson Statistic             2.049935
Q(36-1)                            55.619723
Significance Level of Q           0.01477737

   Variable                     Coeff       Std Error      T-Stat     Signif
*******************************************************************************
1.  CONSTANT                 -0.084746504  0.143748649     -0.58955  0.55645873
2.  AR{1}                    -0.203242385  0.087284082     -2.32852  0.02133754
3.  N_PSENT{0}               -0.008548677  0.008847764     -0.96620  0.33563617
4.  D_PSENT{1}               -0.757209189  0.596482857     -1.26946  0.20641486
5.  N_PRESID{0}               0.017463758  0.022181384      0.78732  0.43244701
6.  D_PRESID{1}              -0.734976843  0.784472109     -0.93691  0.35044351
7.  N_PNVIET{0}              -0.002943748  0.175725196     -0.01675  0.98665866
8.  N_PWATER{0}              -0.573023599  0.714048817     -0.80250  0.42364412
9.  N_PNEVENTS{0}            -0.065675663  0.344020542     -0.19091  0.84887963
10. N_PGULF{0}                1.160017387  1.220670162      0.95031  0.34361513
11. N_JFK{0}                  2.567571077  1.807479788      1.42053  0.15771020
12. N_LBJ{0}                  2.112965922  1.780605618      1.18666  0.23740227
13. N_RMN{0}                  0.441155880  1.853415288      0.23802  0.81221613
14. N_GRF{0}                  1.575376990  1.806258886      0.87218  0.38462689
15. N_JEC{0}                  2.351997256  1.815173575      1.29574  0.19722735
16. N_RWR{0}                 -2.901233788  1.771150120     -1.63805  0.10368922
17. N_GHB{0}                 -0.292931519  1.743246724     -0.16804  0.86679948


* estimate effect of shock to first differenced
* macropartisanship
impulse(print) 1 20 1
# meseq3

   Entry           MESPART
            1  1.7643259775798
            2  1.4057401575051
            3  1.4786199949006
            4  1.4638077229103
            5  1.4668182044009
            6  1.4662063469619
            7  1.4663307023273
            8  1.4663054280462
            9  1.4663105648514
           10  1.4663095208348
           11  1.4663097330232
           12  1.4663096898976
           13  1.4663096986625
           14  1.4663096968811
           15  1.4663096972432
           16  1.4663096971696
           17  1.4663096971846
           18  1.4663096971815
           19  1.4663096971822
           20  1.4663096971819


halt


Normal Completion
